home *** CD-ROM | disk | FTP | other *** search
/ Time Warp / Time Warp.iso / mac / Time Warp / Time Warp.DXR / Shared_34.ls < prev    next >
Encoding:
Text File  |  1997-05-23  |  1.3 KB  |  54 lines

  1. on KeyboardScript
  2.   global discs, discsLoaded, gems
  3.   if the keyCode = 49 then
  4.     set num to the castNum of sprite 5
  5.     if num = 0 then
  6.       nothing()
  7.     else
  8.       set movieName to the name of cast num
  9.       if movieName contains ".MOV" then
  10.         if the movieRate of sprite 5 = 1 then
  11.           set the movieRate of sprite 5 to 0
  12.           updateStage()
  13.         else
  14.           if the movieRate of sprite 5 = 0 then
  15.             set the movieRate of sprite 5 to 1
  16.             updateStage()
  17.           end if
  18.         end if
  19.       end if
  20.     end if
  21.   else
  22.     if the commandDown and (the key = "d") then
  23.       if discs = discsLoaded then
  24.         giveDisc("generic")
  25.       else
  26.         alert("Nur1 Bonus-Disk zur Zeit!")
  27.       end if
  28.     else
  29.       if the commandDown and (the key = "g") then
  30.         if gems = 0 then
  31.           set gems to gems + 1
  32.           LocateSprite(509)
  33.         else
  34.           alert("Nur 1 Bonus-Edelstein zur Zeit!")
  35.         end if
  36.       else
  37.         if the commandDown and (the key = "q") then
  38.           quit()
  39.         else
  40.           if the keyCode = 124 then
  41.             unsetQT(5)
  42.             go(marker(1))
  43.           else
  44.             if the keyCode = 123 then
  45.               unsetQT(5)
  46.               go(marker(-1))
  47.             end if
  48.           end if
  49.         end if
  50.       end if
  51.     end if
  52.   end if
  53. end
  54.